package org.road0329.tools.proto_parse_tool.chargingpile;

import com.alibaba.fastjson.annotation.JSONField;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class ChargeRecord extends ChargingPile {
    private Integer id;

    private String tradeNo;

    private String cardNo;

    private Short recordType;
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date startTime;
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;

    private BigDecimal startCumulant;

    private BigDecimal endCumulant;

    private Integer startSoc;

    private Integer endSoc;

    private Integer chargeLen;

    private BigDecimal chargeEnergy;

    private BigDecimal totalFee;

    private Short chargeWay;

    private Short cutStatus;

    private BigDecimal walletBeforeMoney;

    private BigDecimal walletAfterMoney;

    private Integer priceVersion;

    private Short endChargeType;

    private String vin;

    private Short batteryType;

    private BigDecimal batteryCapacity;

    private BigDecimal batteryNominalU;

    private BigDecimal batteryTotalPower;

    private BigDecimal allowUMax;

    private BigDecimal allowIMax;

    private BigDecimal allowChargeUMax;

    private BigDecimal allowTempMax;

    private Short timeNum;
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date addTime;
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    private List<ChargeDetail> details;

    private MeterCiphertext meterCiphertext;

    public void addDetail(ChargeDetail detail) {
        if(details == null) {
            details = new ArrayList<>(4);
        }
        details.add(detail);
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getTradeNo() {
        return tradeNo;
    }

    public void setTradeNo(String tradeNo) {
        this.tradeNo = tradeNo == null ? null : tradeNo.trim();
    }

    public String getCardNo() {
        return cardNo;
    }

    public void setCardNo(String cardNo) {
        this.cardNo = cardNo;
    }

    public Short getRecordType() {
        return recordType;
    }

    public void setRecordType(Short recordType) {
        this.recordType = recordType;
    }

    public Date getStartTime() {
        return startTime;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public BigDecimal getStartCumulant() {
        return startCumulant;
    }

    public void setStartCumulant(BigDecimal startCumulant) {
        this.startCumulant = startCumulant;
    }

    public BigDecimal getEndCumulant() {
        return endCumulant;
    }

    public void setEndCumulant(BigDecimal endCumulant) {
        this.endCumulant = endCumulant;
    }

    public Integer getStartSoc() {
        return startSoc;
    }

    public void setStartSoc(Integer startSoc) {
        this.startSoc = startSoc;
    }

    public Integer getEndSoc() {
        return endSoc;
    }

    public void setEndSoc(Integer endSoc) {
        this.endSoc = endSoc;
    }

    public Integer getChargeLen() {
        return chargeLen;
    }

    public void setChargeLen(Integer chargeLen) {
        this.chargeLen = chargeLen;
    }

    public BigDecimal getChargeEnergy() {
        return chargeEnergy;
    }

    public void setChargeEnergy(BigDecimal chargeEnergy) {
        this.chargeEnergy = chargeEnergy;
    }

    public BigDecimal getTotalFee() {
        return totalFee;
    }

    public void setTotalFee(BigDecimal totalFee) {
        this.totalFee = totalFee;
    }

    public Short getChargeWay() {
        return chargeWay;
    }

    public void setChargeWay(Short chargeWay) {
        this.chargeWay = chargeWay;
    }

    public Short getCutStatus() {
        return cutStatus;
    }

    public void setCutStatus(Short cutStatus) {
        this.cutStatus = cutStatus;
    }

    public BigDecimal getWalletBeforeMoney() {
        return walletBeforeMoney;
    }

    public void setWalletBeforeMoney(BigDecimal walletBeforeMoney) {
        this.walletBeforeMoney = walletBeforeMoney;
    }

    public BigDecimal getWalletAfterMoney() {
        return walletAfterMoney;
    }

    public void setWalletAfterMoney(BigDecimal walletAfterMoney) {
        this.walletAfterMoney = walletAfterMoney;
    }

    public Integer getPriceVersion() {
        return priceVersion;
    }

    public void setPriceVersion(Integer priceVersion) {
        this.priceVersion = priceVersion;
    }

    public Short getEndChargeType() {
        return endChargeType;
    }

    public void setEndChargeType(Short endChargeType) {
        this.endChargeType = endChargeType;
    }

    public String getVin() {
        return vin;
    }

    public void setVin(String vin) {
        this.vin = vin == null ? null : vin.trim();
    }

    public Short getBatteryType() {
        return batteryType;
    }

    public void setBatteryType(Short batteryType) {
        this.batteryType = batteryType;
    }

    public BigDecimal getBatteryCapacity() {
        return batteryCapacity;
    }

    public void setBatteryCapacity(BigDecimal batteryCapacity) {
        this.batteryCapacity = batteryCapacity;
    }

    public BigDecimal getBatteryNominalU() {
        return batteryNominalU;
    }

    public void setBatteryNominalU(BigDecimal batteryNominalU) {
        this.batteryNominalU = batteryNominalU;
    }

    public BigDecimal getBatteryTotalPower() {
        return batteryTotalPower;
    }

    public void setBatteryTotalPower(BigDecimal batteryTotalPower) {
        this.batteryTotalPower = batteryTotalPower;
    }

    public BigDecimal getAllowUMax() {
        return allowUMax;
    }

    public void setAllowUMax(BigDecimal allowUMax) {
        this.allowUMax = allowUMax;
    }

    public BigDecimal getAllowIMax() {
        return allowIMax;
    }

    public void setAllowIMax(BigDecimal allowIMax) {
        this.allowIMax = allowIMax;
    }

    public BigDecimal getAllowChargeUMax() {
        return allowChargeUMax;
    }

    public void setAllowChargeUMax(BigDecimal allowChargeUMax) {
        this.allowChargeUMax = allowChargeUMax;
    }

    public BigDecimal getAllowTempMax() {
        return allowTempMax;
    }

    public void setAllowTempMax(BigDecimal allowTempMax) {
        this.allowTempMax = allowTempMax;
    }

    public Short getTimeNum() {
        return timeNum;
    }

    public void setTimeNum(Short timeNum) {
        this.timeNum = timeNum;
    }

    public Date getAddTime() {
        return addTime;
    }

    public void setAddTime(Date addTime) {
        this.addTime = addTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public List<ChargeDetail> getDetails() {
        return details;
    }

    public void setDetails(List<ChargeDetail> details) {
        this.details = details;
    }

    public MeterCiphertext getMeterCiphertext() {
        return meterCiphertext;
    }

    public void setMeterCiphertext(MeterCiphertext meterCiphertext) {
        this.meterCiphertext = meterCiphertext;
    }
}